Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: fixed bug in GraphVectorStoreRetriever #27846

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

epinzur
Copy link
Contributor

@epinzur epinzur commented Nov 1, 2024

Description:

This fixes an issue that mistakenly created in #27253. The issue currently exists only in langchain-community==0.3.4.

Test cases were added to prevent this issue in the future.

Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 8:27pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. community Related to langchain-community Ɑ: vector store Related to vector store module 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Nov 1, 2024
@epinzur epinzur force-pushed the fix_gvs_retriever branch 6 times, most recently from 7723002 to 4dd0b14 Compare November 1, 2024 22:41
@@ -837,8 +838,8 @@ class GraphVectorStoreRetriever(VectorStoreRetriever):
retriever = graph_vectorstore.as_retriever(search_kwargs={"score_threshold": 0.5})
""" # noqa: E501

vector_store: GraphVectorStore
"""GraphVectorStore to use for retrieval."""
vectorstore: VectorStore
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing this from vectorstore to vector_store created the bug.

@property
def graph_vectorstore(self) -> GraphVectorStore:
return cast(GraphVectorStore, self.vectorstore)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this cast property to get the 3.13 lint to pass. If there is a better way to do this, please let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jfyi the community integration tests don't run in CI ever, so might be more effective to add this to the astradb ci instead

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Nov 4, 2024
@efriis efriis enabled auto-merge (squash) November 4, 2024 20:22
@efriis efriis merged commit 8eb3862 into langchain-ai:master Nov 4, 2024
18 checks passed
shjunn pushed a commit to shjunn/langchain that referenced this pull request Nov 4, 2024
Description:

This fixes an issue that mistakenly created in
langchain-ai#27253. The issue
currently exists only in `langchain-community==0.3.4`.

Test cases were added to prevent this issue in the future.

Co-authored-by: Erick Friis <[email protected]>
@epinzur epinzur deleted the fix_gvs_retriever branch November 5, 2024 18:44
yanomaly pushed a commit to yanomaly/langchain that referenced this pull request Nov 8, 2024
Description:

This fixes an issue that mistakenly created in
langchain-ai#27253. The issue
currently exists only in `langchain-community==0.3.4`.

Test cases were added to prevent this issue in the future.

Co-authored-by: Erick Friis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature community Related to langchain-community lgtm PR looks good. Use to confirm that a PR is ready for merging. size:M This PR changes 30-99 lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants